package close.kenny.modules.systemmanage
{
	import org.puremvc.as3.multicore.interfaces.IFacade;
	import org.puremvc.as3.multicore.patterns.facade.Facade;
	public class SystemManageFacade extends Facade implements IFacade
	{
		public static const STARTUP:String = "startup";
		
        public function SystemManageFacade( key:String )
        {
            super(key);    
        }

        public static function getInstance( key:String ) : SystemManageFacade 
        {
            if ( instanceMap[ key ] == null ) instanceMap[ key ]  = new SystemManageFacade( key );
            return instanceMap[ key ] as SystemManageFacade;
        }
        override protected function initializeController( ) : void 
        {
            super.initializeController();            
            registerCommand( STARTUP, StartupCommand );
        }
        
        /**
         * Application startup
         * 
         * @param app a reference to the application component 
         */  
        public function startup( app:PrattlerModule ):void
        {
            sendNotification( STARTUP, app );
        }
	}
}